package com.es.controller;

import com.es.entity.Student;
import com.es.service.StudentService;

import javax.swing.plaf.synth.SynthStyle;
import javax.swing.plaf.synth.SynthToolTipUI;

public class StudentController {
    private StudentService service;



    public void save(){
        Student student = new Student();
        student.setName("董昊");
        service.save(student);
    }
    public void update(){
        Student student = new Student();
        student.setId(5);
        student.setName("小岳");
        service.update(student);
    }
    public void delete(){
        service.delete(5);
    }
    public void get(){
        System.out.println(service.get(1));
    }
    public void list(){
        System.out.println(service.list());
    }





    public StudentService getService() {
        return service;
    }

    public void setService(StudentService service) {
        this.service = service;
    }




}
